home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / proplus.zip / PROPLUS.DOC < prev    next >
Text File  |  1991-03-30  |  103KB  |  2,801 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                                 PROTECTION PLUS
  15.                     Copy Protection and User Control System
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                             Version 1.0 for Clipper
  28.                                Copyright (c)1991
  29.                          All Rights Reserved Worldwide
  30.  
  31.                                 C.R.S. Software
  32.                    Eleven Hundred Liberty Avenue Suite 1008
  33.                              Pittsburgh, PA  15222
  34.  
  35.                              (412) 471-SOFT Voice
  36.                               (412) 471-FAXX FAX
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. 1. Introduction
  72.  
  73.  
  74. 1.1 Overview
  75.  
  76. PROTECTION PLUS is the most advanced copy protection and user control system
  77. currently available for Clipper.  It is written entirely in Clipper and
  78. Microsoft C.
  79.  
  80. The PROTECTION PLUS system contains two parts.  Part one is the PROPLUS.EXE
  81. program that stores all protection and version information on each customer.
  82. It is very similar to a client tracking program but customized to managing
  83. software.  Part two is the actual Clipper library that contains many functions
  84. controlling the copy protection and user control.
  85.  
  86. No special programming knowledge or experience is required to use PROTECTION
  87. PLUS functions from within any Clipper program - simply include the desired
  88. function calls in the Clipper source code and add the appropriate PROPLUS
  89. library to the application link list.
  90.  
  91. Like Clipper itself, applications using PROTECTION PLUS require no run-time
  92. license of any kind.  One has the ability to protect an unlimited number of
  93. programs.  PROTECTION PLUS does not change any disk sector information or
  94. cause any harm to any disk media.  PROTECTION PLUS even makes it possible to
  95. hard-code a unique serial number into applications automatically without
  96. recompiling each time.  Completely protect and serialize an application in as
  97. little as 5 seconds.
  98.  
  99. PROTECTION PLUS is easy to use!
  100.  
  101.      1. Add a few lines of source code to the application and recompile.
  102.      2. Run PROPLUS.EXE on the application's distribution diskette setting up
  103.         various parameters such as serial numbers, demo expiration, etc.
  104.      3. The first time your user runs your program, they will be prompted with
  105.         a code entry number.
  106.      4. Simply load PROPLUS.EXE and bring this user's record up on the screen,
  107.         press the F3 key and enter their code entry number.  PROPLUS will then
  108.         list the code to "add protection."  When they enter the code, they
  109.         will have complete protection on their hard drive.  They can never re-
  110.         use the unlock code because the code entry numbers change every time
  111.         the application is executed and the unlock codes vary every day as a
  112.         function of the code entry numbers.  All unauthorized copies of this
  113.         program will no longer work and PROPLUS will even keep track if the
  114.         user is trying to install the program again on a different computer
  115.         once it has already been installed.
  116.  
  117. Install an application as a DEMO!
  118.  
  119.      1. If the demo expiration date in the client's record of the PROPLUS.EXE
  120.         database is non-blank, the application will stop running after that
  121.         day.  This is an extremely effective way to generate sales.  After the
  122.         user has been using the application for 30 days free, they may have
  123.         loaded so much data that they can not live without it.  When it stops
  124.         working they will rush out a check to pay for it.
  125.      2. Oh, so you ask, what happens when the user keeps backing up the date
  126.         and time on their computer?  Can they fool PROTECTION PLUS?  The
  127.         answer is simply no way!  If the user tries to back up the date, the
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.         PROTECTION PLUS code is designed to catch them.  The program knows
  138.         when the program was started as well as when the last session ended.
  139.         Each time the program is used, the window for usage gets smaller and
  140.         smaller until they must purchase it.
  141.      3. If the user would like the demo version to keep running for a few
  142.         extra days or a week or even a month, they can call you to get an
  143.         unlock code.  This way they can continue to use the program while they
  144.         send in a payment.
  145.      4. When the payment is received, the application can be released from the
  146.         demo mode.  REMEMBER!  It's no longer a demo, but it is still very
  147.         copy-protected.
  148.  
  149. Speaking of PAYMENTS!
  150.  
  151.      1. If any of the software distributed is leased by certain clients, pay
  152.         attention!  When adding a user to the PROPLUS.EXE database, simply
  153.         make them a payment client and enter what day of the month payment is
  154.         due.  This will insure strict compliance with the payment agreements
  155.         because the program will stop running on this date.
  156.      2. Each month when a check is received, an unlock code needs to be
  157.         entered on the user's computer that will advance them to the next
  158.         month.  If the payment day falls on a Saturday or Sunday, they will
  159.         have full use of the program until the following Monday.
  160.      3. Once their payments have been completed, it is possible to give them a
  161.         special code that will unlock them forever.
  162.      4. REMEMBER!  It's no longer locking for payments monthly, but it is
  163.         still very copy-protected.
  164.  
  165. And if that is not enough, PROTECTION PLUS allows one to customize 18 extra
  166. codes that may be used in applications.  That is, one can have hidden
  167. procedures in the program that require an unlock code to access them.  If a
  168. user forgets their password, for example, they can call and receive a code to
  169. bypass the password-checking function. If it is undesirable for the user to
  170. have the ability to change certain information online, they can call for
  171. special access to that information.
  172.  
  173. LIST OF FEATURES
  174.  
  175.      1. Copy protect Clipper programs so they will not be handed out.
  176.         This increases sales.
  177.      2. The unlock codes are different each time the program is loaded.  This
  178.         means that two users of the same product can not exchange unlock
  179.         numbers to gain access to the application software.
  180.      3. It is possible to know when a user is trying to install the system on
  181.         a different  computer  than  the  one  the  software  was originally
  182.         installed on.
  183.      4. It is possible to remove protection from a computer in order to
  184.         reactivate it on a new computer.
  185.      5. A hard-coded serial number can be written into the products' .EXE file
  186.         without recompiling the source each time.
  187.      6. Each copy of PROTECTION PLUS is coded uniquely.  No two libraries are
  188.         the same.
  189.      7. Supports DOS and soon Local Area Networks.
  190.      8. There is no need to purchase additional installs.  There is no limit
  191.         to a certain amount of protected programs.  One can use it on as many
  192.         programs as he wishes - even in the same directories!
  193.      9. PROPLUS.EXE is used as a client tracking program.
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.      10. You can restrict an executable to only executing a certain number of
  204.          times.  This  number  is  changeable  from  within  the  program,  if
  205.          desired, to extend the program to a possible user.
  206.      11.  Soon to be available in other languages.
  207.  
  208. How to use this manual
  209.  
  210. This manual is divided into two parts.  Part one is a reference to the
  211. PROPLUS.EXE program.  This is the client tracking and serial numbering
  212. program.  Part two contains a function reference to the library, as well as
  213. source samples.  In part one of the manual, words in brackets are keys for you
  214. to press.  For example:  [enter] means press the enter key.
  215.  
  216. Keep in mind that online help is available through the Norton Guides database
  217. PROPLUS.NG included on the diskette.
  218.  
  219. 1.2 System Requirements
  220.  
  221. These requirements are not just what we suggest you use, but are the absolute
  222. minimum requirements as to what you will need to run our software package.
  223.  
  224.                           IBM PC/XT/AT or compatible
  225.                                 DOS 3 or higher
  226.                                   640 Kb RAM
  227.                       Hard Drive with at least .5 Mb free
  228.                      Monochrome / CGA / EGA / VGA Monitor
  229.                            Any Parallel Text Printer
  230.                           ClipperTM Summer '87 or 5.0
  231.  
  232. The program, PROPLUS.EXE will operate on most Networks and Local Area Networks
  233. (LAN).  This product is Multi-User.
  234.  
  235. 1.3 Installation
  236.  
  237. PROTECTION PLUS is supplied on (1) 5.25" or (1) 3.5" diskette(s) and consists
  238. of the following files:
  239.  
  240. System disk 1
  241.  
  242. INSTALL.EXE                  Installation program
  243. INSTALL.DAT
  244. NORTON.LIB                   Archived Norton Guides database
  245. LIBRARY.LIB                  Archived Clipper libraries
  246. READ.ME                      Last minute changes to the manual
  247. DISK.ID                      Installation program data file
  248. PROGRAM.LIB                  Archived program files
  249.  
  250. INSTALL.EXE is the program that copies the files from the floppy distribution
  251. diskette to your hard drive.  See below on how to use this program.
  252.  
  253. PROPLUS.EXE is the program file for the client tracking and serial numbering
  254. of your applications.  It is created when the install program is run.  Upon
  255. complete installation, this program will create the necessary database files
  256. and indexes it needs.
  257.  
  258. PPLUSS87.LIB and PPLUS50.LIB are the Clipper libraries.  One is for Clipper
  259. Summer '87 and the other is for Clipper 5.0.
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269. PROPLUS.NG is the PROTECTION PLUS Norton Guide database which requires a
  270. Norton Guide reader to use.  This reader is distributed with Clipper 5.0.
  271.  
  272. SAMPLE.PRG is a program that provides a complete example of where the
  273. functions in the PROTECTION PLUS library are logically placed most of the
  274. time.  If you would like to utilize all of the protection features of this
  275. system, you should be able to take this example program, change its cosmetics,
  276. and pop it into any of your existing applications.
  277.  
  278. UNLOCK.EXE is used when an unlock code is needed for a user quickly.  This
  279. avoids having to load the client tracking program just to find an unlock code.
  280.  
  281. READ.ME contains any last minute changes, corrections and information since
  282. the manual was printed and should be read before continuing.  It may be viewed
  283. using any ASCII text editor or displayed at the DOS prompt by typing:
  284.  
  285. C> TYPE READ.ME
  286.  
  287. If the scrolls off the screen then press the [Pause] key or Control-S to pause
  288. the display and press any other key to continue.  Information in the READ.ME
  289. file takes precedence over information in the manual.
  290.  
  291. Installing the software
  292.  
  293. To install PROTECTION PLUS, place the distribution diskette in a floppy drive,
  294. access that drive, and type "INSTALL" [enter].  Then follow the directions of
  295. the installation program on your screen.  For example, if your floppy drive is
  296. A, type:
  297.  
  298. C> A: [enter]
  299. A> INSTALL [enter]
  300.  
  301. The installation program will ask three questions.  The first is "On which
  302. hard drive do you wish to install PROTECTION PLUS?" You cannot choose a floppy
  303. drive.  The second question prompts "Select the type of PROTECTION PLUS you
  304. wish to install." Your choices are Clipper Summer '87 library, Clipper 5.0
  305. library, or both libraries.  All files will be installed to a directory on the
  306. drive you selected called \PROT.  The final question asks you if the program
  307. may modify your AUTOEXEC.BAT file to add \PROT to your existing path.  We
  308. suggest that you answer "YES" to this question.  A copy of your original
  309. AUTOEXEC.BAT file will be created with the extension ".BAK".
  310.  
  311. After the installation program is complete, you should be in the \PROT
  312. directory on your hard drive.  Type "PROPLUS" [enter].  The program will
  313. create all necessary data files and pop up the power-on screen with the C.R.S.
  314. logo.  The installation is now complete.  However, since the client tracking
  315. program is copy protected, there is one more step to follow.  The copy
  316. protection file must be placed on your hard drive.  If this is not done, the
  317. program will run in a limited mode allowing only 9 clients.  Before 9 clients
  318. is accumulated on your system, you must call Technical Support.  The phone
  319. number and hours are located in "User Support" on page .  Someone will walk
  320. you through the online registration procedure, which will take no more than
  321. one minute.  Proceed to PART ONE of the manual for instructions on how to
  322. use the client tracking program.
  323.  
  324. NOTE:  To assist you in completely understanding the product, we strongly
  325. encourage you to read the section "Commonly asked questions" on page .
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335. 1.4 License Agreement
  336.  
  337. C.R.S. hereby grants you a non-exclusive, non-transferable license to use this
  338. product on one Central Processing Unit (CPU) only.  The following paragraphs
  339. contain the agreement which you ("I" in the text) agree to be bound, by
  340. opening the sealed diskette packaging.
  341.  
  342. I understand that the PROTECTION PLUS logo, product names, software, manuals,
  343. documentation and  other  materials  are  either    patented,  copyrighted,
  344. trademarked or owned by C.R.S. as trade secrets or proprietary information.  I
  345. agree not to remove any product identification or notices of such proprietary
  346. restrictions from C.R.S.'s products.
  347.  
  348. I agree that I will only make copies for use as archival backup copies, and
  349. only if such copies are for my personal use.  Any copying of materials or
  350. documentation is prohibited.
  351.  
  352. Government license
  353.  
  354. If you are acquiring the software on behalf of any unit or agency of the
  355. United States government, the following provisions apply:
  356.  
  357. The government acknowledges C.R.S.'s representation that the software and its
  358. documentation were developed at private expense, and no part of them is in the
  359. public domain.
  360.  
  361. The government acknowledges C.R.S.'s representation that the software is
  362. "restricted computer software" as that term is defined in clause 52.227-19 of
  363. the Federal  Acquisition  Regulations  (FAR)  and  is  "commercial  computer
  364. software" as that term is defined in sub-part 227.471 of the Department
  365. of Defense Federal Acquisition Regulation Supplement (DFARS).  The government
  366. agrees that:
  367.  
  368. (I) If the software is supplied to the Department of Defense (DOD), the
  369.     software is classified as "commercial computer software" and government is
  370.     acquiring only "restricted rights" in the software and its documentation
  371.     as the term is defined in clause 252.227-7013 (C)(1) of the DFARS, and
  372.  
  373. (II) If the software is supplied to any unit or agency of the United States
  374.      government other than DOD, the government rights in the software and its
  375.      documentation will be as defined in clause 52.227-19 (C)(2) of the FAR.
  376.  
  377. Restricted rights legend
  378.  
  379. Use, duplication, or disclosure by the government is subject to restrictions
  380. as set forth in sub-paragraphs (C)(1)(ii) of the rights in technical data and
  381. computer software clause at DFARS 252.227-7013.  C.R.S., 1100 Liberty Avenue
  382. Suite 1008, Pittsburgh, PA 15222.
  383.  
  384. C.R.S. warrants that the magnetic media on which the enclosed computer program
  385. is recorded is free from defects in materials and  workmanship under normal
  386. use.  C.R.S. warrants that the computer program will perform substantially in
  387. accordance with the user  manual.  The warranty covering the magnetic media
  388. and computer program is made only for ninety (90) days from the date of
  389. delivery of the program to me or my company as a user.
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401. I agree to return this defective item shipping prepaid during the warranty
  402. period, and C.R.S. must receive it within thirty (30) days of the end of this
  403. warranty period.
  404.  
  405. I agree to either insure the defective item being returned or assume the risk
  406. of loss or damage in transit.  All warranty claims must be addressed to:
  407.  
  408.                                     C.R.S.
  409.                    Eleven Hundred Liberty Avenue Suite 1008
  410.                              Pittsburgh, PA  15222
  411.  
  412. Any claim under the above warranty must include a dated proof of the date of
  413. delivery, such as a copy of my receipt or invoice. I agree to return the
  414. defective item shipping prepaid to C.R.S. during the warranty period.  I agree
  415. that C.R.S.'s liability for damages to the user or others resulting from
  416. use of the computer program shall not exceed the amount of the license fee
  417. payable to C.R.S. under this Agreement.
  418.  
  419. I AGREE THAT C.R.S. SHALL NOT IN ANY CASE BE LIABLE FOR SPECIAL, INCIDENTAL,
  420. CONSEQUENTIAL, INDIRECT OR OTHER SIMILAR DAMAGES ARISING FROM ANY BREACH OF
  421. THESE WARRANTIES, EVEN IF C.R.S. OR ITS AGENT HAS BEEN ADVISED OF THE
  422. POSSIBILITY OF SUCH DAMAGES.
  423.  
  424. This means that C.R.S. is not responsible for any costs, including, but not
  425. limited to, those incurred as a result of lost profits or revenue, loss of use
  426. of the computer program, loss of data, costs of re-creating lost data, the
  427. cost of any substitute program, claims by any party other than me, or for
  428. other similar costs.
  429.  
  430. I understand that some states do not allow the exclusion or limitation of
  431. incidental or consequential damages, so the above limitation or exclusion may
  432. not apply to me.
  433.  
  434. I agree that any breach of one or more of the provisions of this agreement by
  435. me shall constitute an immediate termination of this agreement.
  436.  
  437. Nevertheless, I agree that in the event of such termination, all provisions of
  438. this agreement which protect the rights of C.R.S. will remain in force.
  439.  
  440. 1.5 User Support
  441.  
  442. We thank  you  for  purchasing  PROTECTION  PLUS!    This  manual  contains  a
  443. description of the features and capabilities of the program.  However, if you
  444. have any questions left unanswered, or if you discover problems with any part
  445. of the program or this manual, please feel free to call the our Technical
  446. Support line at 412/471-SOFT, 10am-5pm, EST Monday through Friday.
  447.  
  448. 1.6 Trademark Acknowledgements
  449.  
  450.             Clipper   ---------------->  Nantucket Corporation
  451.             MS Link   ---------------->  Microsoft Corporation
  452.             PLINK86plus   ------------>  Phoenix Technologies Ltd.
  453.             Turbo Link   ------------->  Borland International
  454.             Blinker   ---------------->  Blink, Inc.
  455.             Norton Guides   ---------->  Peter Norton Computing
  456.             CompuServe   ------------->  CompuServe Information Service
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467. Other brand and product names used in this documentation may be registered
  468. trademarks of their respective owners.  Their use in this manual are for
  469. identification purposes only.
  470.  
  471. 2. PART ONE - PROPLUS.EXE
  472.  
  473. 2.1 Initial Installation
  474.  
  475. When PROPLUS comes up running the first time, you will be asked to enter your
  476. company's name.  This name will be included in the header of all reports
  477. generated by PROPLUS.
  478.  
  479.         ╓─────────────────────────────────────────────────────────────╖
  480.         ║                    Initial Installation                     ║
  481.         ║                                                             ║
  482.         ║ Registered User:                                            ║
  483.         ╙─────────────────────────────────────────────────────────────╜
  484.  
  485.           Enter Name to be PERMANENTLY imbedded in all report titles.
  486.  
  487. After entering your company name, files will be created and reindexed for the
  488. first time and you will then see the POWER-UP Banner Screen.  The power-up
  489. screen will either disappear after 20 seconds or you can press any key to move
  490. to the main menu quicker.
  491.  
  492. 2.2 Main Menu
  493.  
  494.     ┌─────────────────────────────────────────────────────────────────────┐
  495.     │ ┌──────────────────────────────────────────────────────────────────┐│
  496.     │ │             Protection Plus for Clipper v1 * DEMO *              ││
  497.     │ │     Copyright (c)  1991 -    C.R.S.   - All Rights Reserved      ││
  498.     │ └──────────────────────────────────────────────────────────────────┘│
  499.     │                                                                     │
  500.     │                       ╔══ Protection Plus ═══╗                      │
  501.     │                       ║1. Customer Setup     ║                      │
  502.     │                       ║2. Master Settings    ║                      │
  503.     │                       ║3. Product Picklist   ║                      │
  504.     │                       ║4. Reports Menu       ║                      │
  505.     │                       ║5. Utilities Menu     ║                      │
  506.     │                       ║6. Disk Picklist      ║                      │
  507.     │                       ║7. Program Information║                      │
  508.     │                       ╚══════════════════════╝                      │
  509.     │                                                                     │
  510.     ├─────────────────────────────────────────────────────────────────────┤
  511.     │Add / Edit / Delete customers, protect diskettes & find unlock codes.│
  512.     └─────────────────────────────────────────────────────────────────────┘
  513.  
  514. The first time that you run PROPLUS, you will notice that it is in the DEMO
  515. mode.  You will have to call C.R.S. at 412-471-SOFT(7638) 10am to 5pm EST
  516. Monday - Friday.  We will give you the code that will unlock your PROPLUS.
  517.  
  518. Until you call us, you can add as many products and customers to your database
  519. as you want, however, you can not protect any disks.
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. 2.3 Master Settings
  534.  
  535.      ╓───────────────────────────────────────────────────────────────────╖
  536.      ║        Protection Plus for Clipper / Master Settings              ║
  537.      ╠═══════════════════════════════════════════════════════════════════╣
  538.      ║ Your Company Name:    C.R.S.                                      ║
  539.      ║           Address:    1100 Liberty Ave, Suite 1008                ║
  540.      ║           Address:    Pittsburgh, PA 15222                        ║
  541.      ║             Phone:    412-471-7638                                ║
  542.      ║             Fax #:    412-471-3299                                ║
  543.      ╠═══════════════════════════════════════════════════════════════════╣
  544.      ║   Default Expiration Type:    N        Distributor:    Y          ║
  545.      ║                     Codes:    Page                                ║
  546.      ║    Payment are due on the:    20 day of the month                 ║
  547.      ║        Demo will work for:    10 days and then stop.              ║
  548.      ╠═══════════════════════════════════════════════════════════════════╣
  549.      ║   The default protected program execution limit is   0.           ║
  550.      ╠══════════╦══════════╦════════════╦════════════╦═══════════════════╣
  551.      ║   TONES  ║ Get   Y  ║ Error   Y  ║ Alert   Y  ║ ESC = Main Menu   ║
  552.      ╙──────────╨──────────╨────────────╨────────────╨───────────────────╜
  553.  
  554. The top box is where you will enter your own company information.  All of this
  555. information gets stored in the protection control files that we will be
  556. talking about later.
  557.  
  558. The next box of information has to do with your default protection.
  559.  
  560. 2.3.1 Default expiration type
  561.  
  562. When you are editing this field, a pop-up window will show you the 4 types of
  563. expiration.  Simply press the first letter of the type you choose or cursor to
  564. the type and press enter.
  565.  
  566.                              ┌ Expiration Types ┐
  567.                              │Payments          │
  568.                              │Demo              │
  569.                              │None              │
  570.                              │Exe Count         │
  571.                              └──────────────────┘
  572.  
  573.   Payments  ------->  If most of your customers are paying you monthly
  574.                       payments for  your  software,  you  would  select  this
  575.                       expiration type.
  576.  
  577.   Demo      ------->  If most of the programs you sent out are set up as demo
  578.                       versions, select demo.
  579.  
  580.   None      ------->  Will add no expiration to the program.
  581.  
  582.   Exe Count ------->  Will cause the program to stop after "n" number of
  583.                       program executions.
  584.  
  585. 2.3.2 Distributor
  586.  
  587. Let's say you have a product that you sell to a software distributor and let's
  588. say they order your product in lots of 100.  Defining the distributor would
  589. allow you to mass produce your program diskettes without having to enter the
  590. same info over and over each time.  Later when an end user calls to get
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599. unlocked, you can update their protection control file using the pp_savepp()
  600. function from your PROPLUS.LIB.
  601.  
  602.             ┌────────────────────────────────────────────────────┐
  603.             │     Product:                                       │
  604.             │ Distributor:                                       │
  605.             │     Address:                                       │
  606.             │        City:                                       │
  607.             │       State:                                       │
  608.             │    Zip Code:                                       │
  609.             │   Disk Size:                                       │
  610.             └────────────────────────────────────────────────────┘
  611.  
  612. By hitting the [enter] key on the Product and Disk Size fields, you will be
  613. prompted with a pop up picklists to choose from.
  614.  
  615. 2.3.3 Codes
  616.  
  617. Protection Plus allows you to define up to 18 protection codes.  Here is where
  618. you define each of the code names.
  619.  
  620.       ┌────────────────────────────────────────────────────────────────┐
  621.       │        Define the 18 available Unlock Code Names.              │
  622.       ╞════════════════════════════════════════════════════════════════╡
  623.       │ 1.   UNLOCK EXPIRE DATE        10.   CREATE PROTECTION FILE    │
  624.       │ 2.   PAYMENT UNLOCK            11.                             │
  625.       │ 3.   KILL PROTECTION FILE      12.                             │
  626.       │ 4.   EXTEND DEMO USAGE         13.                             │
  627.       │ 5.   BYPASS DATE CHECK         14.                             │
  628.       │ 6.   UPDATE CONTROL FILE       15.                             │
  629.       │ 7.                             16.                             │
  630.       │ 8.                             17.                             │
  631.       │ 9.                             18.                             │
  632.       └────────────────────────────────────────────────────────────────┘
  633.  
  634. 2.3.4 Payments are due on
  635.  
  636. If your company has a payment plan, here is where you tell PROPLUS the day of
  637. the month that your payments are due.  This will allow you to cause the users
  638. software to stop working after that date.  We have had fabulous results in
  639. collecting our A/R when we use this protection.  Your customer will simply
  640. call you monthly to get the next month unlock code.
  641.  
  642. 2.3.5 Demo will work for
  643.  
  644. If you send a full running program to a prospective customer and place it in
  645. the DEMO type expiration, you can tell PROPLUS how many days to let the
  646. program function.  Their demo will stop after n number of days.  If the
  647. customer used your program long enough and likes it, they will purchase it
  648. from you and you will give them a new code to unlock it all the way.
  649.  
  650. The tone toggles are, Yes or No questions.  If you want the GET beep answer Y.
  651. The GET beep is when you fill a field.  The ERROR beep is when you enter un-
  652. validatable data and ALERT beep is when the program is trying to alert you to
  653. look at the screen.  You will see alert messages at the bottom of the screen.
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665. 2.4 Product Setup
  666.  
  667. Simply enter the product name, EXE name (for serializing only) and the version
  668. number.  After you enter one product, you will have a browse screen to look at
  669. the product list.
  670.  
  671.           ╓────────────────────────────────────────────────────────╖
  672.           ║   Product Setup Screen                                 ║
  673.           ║                                                        ║
  674.           ║         Product Name:                                  ║
  675.           ║     Product EXE Name:               (no extension)     ║
  676.           ║         Version Name:                                  ║
  677.           ║         Next Serial#:                                  ║
  678.           ║     EXE name is only required if you plan on using     ║
  679.           ║     HARD Serial Number Stamping your program.          ║
  680.           ╙────────────────────────────────────────────────────────╜
  681.  
  682. 2.4.1 Next serial number
  683.  
  684. It is the next available serial number to be given to the next program that
  685. you protect.  This number gets advanced each time you protect a new program.
  686.  
  687. For each of your different products, you should try and space your serial
  688. numbers by 5000.  This will keep the serial numbers unique and keep serial
  689. numbers from one product from overlapping to another product.
  690.  
  691. 2.5 Reports Menu
  692.  
  693.                               ╔═ Reports Menu ═╗
  694.                               ║1. Printer Setup║
  695.                               ║2. Print Reports║
  696.                               ╚════════════════╝
  697.  
  698.  
  699. 2.5.1 Printer setup
  700.  
  701.                     ╔════════════════════════════════════╗
  702.                     ║   List of Printer Configurations   ║
  703.                     ╠═══╤══════════════════════════════╤═╣
  704.                     ║Con│         Printer Name         │N║
  705.                     ╟───┼──────────────────────────────┼─╢
  706.                     ║CIT│Citizen MSP-10/20             │0║
  707.                     ║HP │Hewlett Packard Laser Jet II  │0║
  708.                     ║IBM│IBM Proprinter                │0║
  709.                     ║OTC│Output Technologies           │0║
  710.                     ║   │                              │ ║
  711.                     ╚═══╧══════════════════════════════╧═╝
  712.  
  713. The PRINTER  SET-UP  UTILITY  will  allow  you  to  define  your  own  printer
  714. configurations in addition to the four (4) standard configurations included
  715. with the program.
  716.  
  717. 1.     To view/edit a configuration, highlight it with the cursor keys, and
  718.        press [Return]. A window will appear displaying the information for
  719.        that printer configuration.
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.         ╓────────────────────────────────────────────────────────────╖
  732.         ║    Configuration ID...: IBM                                ║
  733.         ║    Printer Description: IBM Proprinter                     ║
  734.         ║    Network Printer No.: 0                                  ║
  735.         ║    Reset String.......: \018                               ║
  736.         ║                                                            ║
  737.         ║                           Setup String         Width    Len║
  738.         ║           ___________________________________  _____    ___║
  739.         ║Level 1    \018                                    80     60║
  740.         ║Level 2    \027:                                   96     60║
  741.         ║Level 3    \015                                   217     60║
  742.         ╙────────────────────────────────────────────────────────────╜
  743.  
  744. a.     The CONFIGURATION ID is a unique identifier to identify the printer
  745.        configuration.
  746.  
  747. b.     The PRINTER DESCRIPTION is a brief description of the printer. It
  748.        should contain  information  relevant  as  to  what  features  the
  749.        configuration has.
  750.  
  751. c.     The NETWORK PRINTER NUMBER is the printer that all reports should be
  752.        routed to. If the system is running a network, the number should
  753.        correspond to the network assigned printer number, where the first
  754.        network printer is labeled one (1). If the program is running on a
  755.        stand alone system, the number should correspond to the first parallel
  756.        printer port on the PC. The number should then be set to zero (0).
  757.  
  758. d.     The RESET STRING is the escape sequence that will be sent to the
  759.        printer on completion of a report. This should also be set as to reset
  760.        the printer to its default power-up condition.
  761.  
  762. e.     Next are three sets of set-up strings, widths, and lengths. The REPORT
  763.        GENERATOR uses these to determine how to lay out the lines of text.
  764.        The REPORT GENERATOR automatically selects the one best suited for the
  765.        report.  If one line of the report is too wide for Width 1, but is less
  766.        than Width 2, the second set-up string will be used.  If it is wider
  767.        than Width 2, then Width 3 will be used.  If the report is still too
  768.        wide, the REPORT GENERATOR will utilize more than one line on the page
  769.        per record printed, printing only as many fields on each line as will
  770.        fit without breaking and will wrap to the next line.  If a line has to
  771.        wrap, the REPORT GENERATOR will automatically adjust the number of
  772.        lines per page since fewer records will fit on a page.  Refer to your
  773.        owners manual for the codes relevant to your printer.
  774.  
  775. 2.     To edit any of the fields, enter its number, and press [return].
  776.  
  777. 3.     To leave, press the [ESC] key.
  778.  
  779. 4.     If any changes were made, you will be presented with a prompt that will
  780.        ask to Accept, Retry, or Cancel. If all changes are correct, then press
  781.        [A]. If you wish to edit a field, then press [R]. Should you decide
  782.        that you do not want the changes to be saved, then press [C].
  783.  
  784. 2.5.2 Printing reports
  785.  
  786. This option allows users to generate reports by File Name.  Each File Name
  787. includes one or more Field Titles.  Each Field Title has different data that
  788. may be chosen for a report.
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797. 1.     Field Titles may be given a range by assigning an upper, and lower
  798.        limit. The user may also request that a Title Total be reported by
  799.        typing [Y] when prompted by; "Would you like a total figure on this
  800.        title (Y/N)"?
  801.  
  802. 2.     Use the cursor keys to highlight the File Name that you want to
  803.        generate a report on.
  804.  
  805. 3.     Press [Return]. The Report Title window will then appear.  Names of
  806.        previously created report will be listed.  The window will be empty if
  807.        no reports have been created.
  808.  
  809. 4.     To create a report, press the [INS] key. A window will appear.  Enter
  810.        the name of the report that you wish to create, and press [Return].
  811.  
  812. 5.     At this time, you will be asked for a printer configuration file to be
  813.        used for the report. By pressing return, a window will appear with your
  814.        current printer configurations in it. Use the cursor keys to highlight
  815.        the configuration file that you wish to use, and press [Return].
  816.  
  817. 6.     You will then be returned to the window with your report name in it.
  818.        Highlight the report name using the cursor keys, then press [Return].
  819.  
  820. 7.     Press the [INS] key to bring a window up that will allow you to select
  821.        the available titles for your report. High-light your choice, then
  822.        press [Return].
  823.  
  824. 8.     You will then be presented with a window that will allow you to choose
  825.        the fields that you want contained in the report.  By highlighting the
  826.        field that you want, then pressing [Return], it will select that field.
  827.  
  828. 9.     Additional fields may be selected by repeating steps 7 & 8.
  829.  
  830. 10.    An Upper and Lower limit may be placed on the fields in your report.
  831.        Entering a range will limit the sorting to data belonging to or falling
  832.        within the Upper and Lower limits of the range specified.
  833.  
  834. 11.    To enter a range for a field, highlight the field, and press [Return].
  835.        A window will appear requesting a Upper limit, Lower limit, and if you
  836.        wish to have the field total at the conclusion of the report.
  837.  
  838. 12.    To enter additional ranges, repeat step 11.
  839.  
  840. 13.    Once you have finished adding titles, and ranges to your report the
  841.        [ESC] key should be pressed.  A window will appear presenting you with
  842.        all the information that you have selected for your report.
  843.  
  844. 14.    A prompt will appear. Press [Y] to save & print the report.  Press [N]
  845.        to save the report to disk.
  846.  
  847. 15.    If you press [Y] then you will be presented with a prompt asking for an
  848.        optional heading for the report. Enter up to two lines of text followed
  849.        by a [Return].
  850.  
  851. 16.    After this point you will be asked to select what sort option you wish
  852.        to use for your report. Highlight the option that you wish to use, then
  853.        press [Return].
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863. 17.    Your report will then begin to print. To abort the printout at any
  864.        time, just press a key. You will be returned to the main menu.
  865.  
  866. 2.6 Utilities Menu
  867.  
  868.                           ╔════ Utilities Menu ════╗
  869.                           ║1. Adjust ProPlus Colors║
  870.                           ║2. Sort & Reindex Files ║
  871.                           ╚════════════════════════╝
  872.  
  873. 2.6.1 Adjusting colors
  874.  
  875. Option 1, Adjust Colors allows you to choose your own color settings of
  876. PROPLUS.EXE.
  877.  
  878. 2.6.2 Sort and reindex files
  879.  
  880. Option 2 will pack and reindex all PROPLUS files.
  881.  
  882. 2.7 Disk Picklist
  883.  
  884. This allows you to tell PROPLUS your drive configuration.
  885.  
  886.       ╓────────────────────────────────────────────────────────────────╖
  887.       ║                             ┌────────────────────────────────┐ ║
  888.       ║                             │████████████████████████████████│ ║
  889.       ║                             │██████████████████████████████ █│ ║
  890.       ║                             │████████████████████████████████│ ║
  891.       ║ Disk Size Configuration     │████████████████████████████████│ ║
  892.       ║                             │████████████████████████████████│ ║
  893.       ║ Disk Size    3 1/2          │████████████████████████████████│ ║
  894.       ║     Drive    B:             │████████████████████████████████│ ║
  895.       ║                             │████████████████████████████████│ ║
  896.       ║                             │████████████████████████████████│ ║
  897.       ║                             │█████                ███████████│ ║
  898.       ║                             │█████   ████         ███████████│ ║
  899.       ║                             │█████   ████         ███████████│ ║
  900.       ║                             │█████   ████         ███████████│ ║
  901.       ║                             │█████                ███████████│ ║
  902.       ║                             └────────────────────────────────┘       ║
  903.       ╙────────────────────────────────────────────────────────────────╜
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929. 2.8 Customer Setup
  930.  
  931. This is where you will maintain your customers.  If you haven't added any
  932. customers yet you will be prompted with the following screen.
  933.  
  934.      ┌──────────────────────────────────────────────────────────────────┐
  935.      │          Protection Plus for Clipper / Customer Screen           │
  936.      ├──────────────────────────────────────────────────────────────────┤
  937.      │Purchasing Company:                                               │
  938.      ├──────────────────────────────────────────────────────────────────┤
  939.      │ Product Purchased:                             Version:          │
  940.      │     EXE File Name:                        EXE Serial #:     1002 │
  941.      ├──────────────────────────────────────────────────────────────────┤
  942.      │Users Name:                                                       │
  943.      │   Address:                                                       │
  944.      │      City:                        State:       Zip:              │
  945.      │     Phone:                          Fax:                         │
  946.      ├──────────────────────────────────────────────────────────────────┤
  947.      │       Disk Size:         Drive:       Date Shipped:   03/11/91   │
  948.      │ Expiration Type:   N               Expiration Date:     /  /     │
  949.      │Expiration Count:     0              Date Installed:     /  /     │
  950.      │    Protection #:          0               Comments:   NotePad    │
  951.      ├──────────────────────────────────────────────────────────────────┤
  952.      │ F2 = Protect a Diskette            F3 = View Unlock Codes        │
  953.      └──────────────────────────────────────────────────────────────────┘
  954.  
  955. If you are entering a new customer, simply fill out the record.  This is
  956. pretty much straight forward.
  957.  
  958. 1.     Type the Company Name.  If you have previously added this company, you
  959.        will be alerted that this company already exists, but you will be
  960.        allowed to continue.  That's because it is possible for a company to
  961.        own more than one of your software programs.
  962.  
  963. 2.     The next field is the Product name.  If you have a blank field here,
  964.        simply press the [enter] key and a product picklist will appear on your
  965.        screen.  Select the correct product and press [enter].  You can also
  966.        add a new product to the product pick list from here.  When you select
  967.        a product, the Version, EXE Name and Serial Number fields on your
  968.        screen will be filled in for you.  You should have no reason to change
  969.        those fields.
  970.  
  971. 3.     Other fields such as disk size and expiration type offers a picklist.
  972.        Simply choose the item from the picklist and press enter and the data
  973.        will be copied into your field.
  974.  
  975. 4.     The NotePad field is a Clipper Memo field.  You may store all kinds of
  976.        extra info here.
  977.  
  978. 5.     The Protection # offers you the ability to tell if a user of your
  979.        protected software is trying to install your program on a different
  980.        computer than the one they originally installed it on.  After you have
  981.        a few customers entered into your database, you will be prompted with a
  982.        browse screen.  You can use your cursor keys to browse through the
  983.        fields or enter the first few letters of the company name and press
  984.        enter.  This will pop you right to the first occurrence of that
  985.        company.  Normally, the company name is the active browse key.  If
  986.        you would like to browse by one of the other keys, press the
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.        [F10] key and the pop-up key choice window will appear.  Select the key
  996.        that you would like to use and it then becomes active.
  997.  
  998.                             ╔═ Select Key Field ═╗
  999.                             ║1. Company Name     ║
  1000.                             ║2. Product          ║
  1001.                             ║3. Ser. #           ║
  1002.                             ║4. ST               ║
  1003.                             ║5. Exp. Date        ║
  1004.                             ║6. Protection ID    ║
  1005.                             ╚════════════════════╝
  1006.  
  1007.      ┌──────────────────────────────────────────────────────────────────┐
  1008.      │          Protection Plus for Clipper / Customer Screen           │
  1009.      ├──────────────────────────────────────────────────────────────────┤
  1010.      │Purchasing Company:                                               │
  1011.      ├──────────────────────────────────────────────────────────────────┤
  1012.      │ Product Purchased:                             Version:          │
  1013.      │     EXE File Name:                        EXE Serial #:          │
  1014.      ├──────────────────────────────────────────────────────────────────┤
  1015.      │Users Name:                                                       │
  1016.      │   Address:                                                       │
  1017.      │      City:                        State:       Zip:              │
  1018.      │     Phone:                          Fax:                         │
  1019.      ├──────────────────────────────────────────────────────────────────┤
  1020.      │       Disk Size:         Drive:       Date Shipped:     /  /     │
  1021.      │ Expiration Type:   N               Expiration Date:     /  /     │
  1022.      │Expiration Count:                    Date Installed:     /  /     │
  1023.      │    Protection #:                          Comments:   NotePad    │
  1024.      ├──────────────────────────────────────────────────────────────────┤
  1025.      │ F2 = Protect a Diskette            F3 = View Unlock Codes        │
  1026.      └──────────────────────────────────────────────────────────────────┘
  1027.  
  1028. When you hit [enter] on a customer name, you will be in the edit mode.  Simply
  1029. cursor to the desired field you want to edit and press [enter] and change the
  1030. field.  When you are finished editing press [esc] and your changes will be
  1031. recorded.
  1032.  
  1033. 2.9 Protecting Disks
  1034.  
  1035. When you are finished adding the record, re-select it as if you are editing
  1036. it.  At that point you may press the [F2] key and add the protection to the
  1037. floppy disk.
  1038.  
  1039. If you named an .EXE file in the product, make sure that it is on the diskette
  1040. so that its serial number can be recorded correctly.
  1041.  
  1042. The following messages will be displayed when you add protection to a disk.
  1043.  
  1044.                                   ** ERROR **
  1045.                      Drive A: not ready or not formatted.
  1046.                            Press any key to continue
  1047.  
  1048. This message means that the diskette in the drive needs formatted, you forgot
  1049. to shut the drive latch or some other reason that would cause PROPLUS not to
  1050. read the disk.
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.                                  ** WARNING **
  1062.             Drive A: already has a protection control file for this
  1063.          application.  Press 'y' to continue, any other key to abort.
  1064.  
  1065. This message means that the diskette in the drive already has a protection
  1066. control file on it.  If you would like to overwrite it, press the [y] key.
  1067.  
  1068.                                  ** NOTICE **
  1069.       Protection Plus control file created.  Product EXE not serialized.
  1070.            The EXE name is missing from the product database screen.
  1071.  
  1072. This message means that the diskette in the drive now contains the protection
  1073. control file.  It also indicates that the .EXE file was not serialized because
  1074. you did not name the .EXE file name in your product database.
  1075.  
  1076.                                  ** NOTICE **
  1077.       Protection Plus control files created.  Product EXE not serialized.
  1078.           The file YOURFILE.EXE is missing on the destination drive.
  1079.  
  1080. This message means that the diskette in the drive now contains the protection
  1081. control file.  It also indicates that the .EXE file was not serialized because
  1082. you named the .EXE file name in your product database, however the .EXE file
  1083. on your product diskette is missing.
  1084.  
  1085.                                  ** NOTICE **
  1086.        Protection Plus control files created.  Product EXE has not been
  1087.  serialized.  The serial() function is missing from the program YOURFILE.EXE.
  1088.          Check your program to make sure the function serial() exists.
  1089.  
  1090. This message means that the diskette in the drive now contains the protection
  1091. control file.  It also indicates that the .EXE file was not serialized because
  1092. either, you forgot to insert the function serial() in your main .PRG file or
  1093. you have already protected the file.
  1094.  
  1095.                     Protection Plus control files created.
  1096.                        Product EXE has been serialized.
  1097.                            Press any key to return.
  1098.  
  1099. This message means that the diskette in the drive now contains the protection
  1100. control file and the .EXE file has been modified.
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127. 2.10 Unlock Codes
  1128.  
  1129. When a user calls to receive an unlock code from you, you can press the [F3]
  1130. key from anyplace in PROPLUS.  The following screen will appear.
  1131.  
  1132.                     ┌─────────────────────────────────────┐
  1133.                     │ Code Entry Number from user:    1234│
  1134.                     ├──┬─────────────────────────┬────────┤
  1135.                     │ 1│UNLOCK EXPIRE DATE       │ 3245098│
  1136.                     │ 2│PAYMENT UNLOCK           │ 3369862│
  1137.                     │ 3│KILL PROTECTION FILE     │ 3494626│
  1138.                     │ 4│MAKE DEMO EXP. 4/10/91   │ 3619390│
  1139.                     │ 5│BYPASS DATE CHECK        │ 3744154│
  1140.                     │ 6│                         │       0│
  1141.                     │ 7│                         │       0│
  1142.                     │ 8│                         │       0│
  1143.                     │ 9│                         │       0│
  1144.                     │10│CREATE PROTECTION FILE   │ 4367974│
  1145.                     │11│                         │       0│
  1146.                     │12│                         │       0│
  1147.                     │13│                         │       0│
  1148.                     │14│                         │       0│
  1149.                     │15│                         │       0│
  1150.                     │16│                         │       0│
  1151.                     │17│                         │       0│
  1152.                     │18│                         │       0│
  1153.                     └──┴─────────────────────────┴────────┘
  1154.  
  1155.  
  1156. Ask the user for their code enter number and type it in.  A different number
  1157. will be displayed for each code.
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. 2.11 UNLOCK.EXE
  1194.  
  1195. UNLOCK.EXE is  used  to  obtain  the  unlock  codes  without  having  to  load
  1196. PROPLUS.EXE.  This program is not to be distributed.  Here is the way it
  1197. works.
  1198.  
  1199.                           Usage: UNLOCK <code number>
  1200.  
  1201. The code number is the code entry number that your customer will read to you.
  1202.  
  1203.                              C:\PROT>unlock 12345
  1204.  
  1205. You are not authorized to distribute this Unlock program.  It is the property
  1206. of C.R.S. and contains trade secret information.  This program is not to be
  1207. released under any conditions (without expressed written consent of C.R.S.) to
  1208. anyone other than licensee's of Protection Plus(tm).
  1209.  
  1210. Protection Plus (tm) is Copyright (c)1989-1991 by C.R.S. Call us at 412-471-
  1211. 7638 for assistance with this program.
  1212.  
  1213.                             Unlock codes for 12345:
  1214.  
  1215.                Code 1:  10074792               Code 2:  10462284
  1216.                Code 3:  10849776               Code 4:  11237268
  1217.                Code 5:  11624760               Code 6:  12012252
  1218.                Code 7:  12399744               Code 8:  12787236
  1219.                Code 9:  13174728              Code 10:  13562220
  1220.               Code 11:  13949712              Code 12:  14337204
  1221.               Code 13:  14724696              Code 14:  15112188
  1222.               Code 15:  15499680              Code 16:  15887172
  1223.               Code 17:  16274664              Code 18:  16662156
  1224.  
  1225. 3. PART TWO - Library Reference
  1226.  
  1227.  
  1228. 3.1 Compiling and Linking
  1229.  
  1230. There are no special instructions for compiling your source code when using
  1231. functions from the PROTECTION PLUS library.  However, there is one immediate
  1232. change to your application source code.  The PUBLIC variable PP_CFILE must be
  1233. defined in your application containing the control filename.  The ".PPP"
  1234. extension is appended automatically.  See the "Function Reference" section
  1235. below for a coding example of this.  Review the section "Reserved Words" on
  1236. page  to make sure that variable names in your program do not conflict with
  1237. the public variables used in the library's functions.
  1238.  
  1239. There is only one change when linking.  Add the appropriate library to your
  1240. link library list.  That is, if you are using Clipper Summer '87, use
  1241. PPLUSS87.LIB; if you compile with Clipper 5.0, use PPLUS50.LIB.  The location
  1242. of the PROTECTION PLUS library on your library link list is not important.
  1243. For all of our applications, it is placed as the last library in the list.
  1244.  
  1245. All function names used in the PROTECTION PLUS system are preceded with "pp_"
  1246. this is to easily (1) distinguish a name so that it is associated with
  1247. PROTECTION PLUS, and (2) keep your function names from possibly conflicting.
  1248. The PROTECTION PLUS library may be allocated to an overlay if you are using
  1249. Blinker in your application.
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259. 3.2 Commonly Asked Questions
  1260.  
  1261. These questions were asked through the Nanforum on CompuServe.  Thank you to
  1262. the people that these, for it helped us explain how the product works.
  1263.  
  1264. Don Caton asked "Once the program is unlocked, what's to prevent someone from
  1265. copying the unlocked files to another computer?  Obviously you must have some
  1266. way of uniquely identifying the computer or hard drive or both, so what about
  1267. backups and restores?  What happens if they run a disk defragger that moves
  1268. the files around?  How about if they replace the hard drive?  What if they
  1269. have to reformat and/or repartition the drive because of a drive failure or
  1270. they want different partition sizes then they had before or they upgrade to a
  1271. different version  of  DOS?    Will  any  of  these  things  require  a new
  1272. installation?"
  1273.  
  1274. Well here are the answers!  When it comes to the term "unlock," there is a
  1275. distinction that you need to know.  That is the difference between copy
  1276. protecting and execution limiting.  If you would like to "copy-protect" your
  1277. application, once the application is received by the client he calls you,
  1278. follows a 10 second sequence of events, and the product is protected.  This
  1279. protection CAN be backed up, restored, unfragmented (moved), copied from one
  1280. hard drive to a new one (on the same computer), and transferred to a new
  1281. version of DOS (also on the same computer).  The protection is stored in a
  1282. "system" file.  Any utility that can copy this file can manipulate the
  1283. protection at will.  The application will only work, however, on the computer
  1284. that the protection was installed on.
  1285.  
  1286. Copy protection  is  separate  from  application  limiting.    That  is, the
  1287. "unlocked" that we talk about means that the application is free to run
  1288. without expiring on a certain date or after a certain number of executions.
  1289. If you choose to copy protect the application AND limit it to a demo version,
  1290. you can unlock the demo version but still keep the copy protection.  There is
  1291. NO WAY for you to "eliminate" copy protection from your application without
  1292. changing the source.  You can, however, remotely disable the protection
  1293. from one computer and then remotely enable it on another by only a telephone
  1294. call from your user.  This is great when he or she calls you up and asks to
  1295. move the application to another computer.  You do not need to send them new
  1296. disks.  If they copy the files to another computer, the copy protection
  1297. routines will simply not allow the program to work.  You could, however, if
  1298. you choose to, add copy protection to any program anywhere remotely over the
  1299. phone.  You can also run any other of your special "hidden" routines that you
  1300. do not want your user to perform unaided, remotely!
  1301.  
  1302. Roger Weiss asked "What is to keep a person from using a disk copy program, or
  1303. disk copy card from copying the distribution disks and then using the same
  1304. code to install it on several systems?  I have found that using a "hardware
  1305. key" is the best copy protection around.  They add about $40.00 to the cost of
  1306. the software, allow customers to make backups of the distribution disks and
  1307. keeps the software from being stolen.  The customer can restore the code to a
  1308. drive without having to bother me. (I tend to be out of the office a lot and
  1309. like to keep the Cell. Phone bill down).  Can your product cause the code to
  1310. revert to a "DEMO" mode if the correct key is not entered?  I let all my
  1311. customers share their disks with others.  If the hardware key is missing they
  1312. get a demo version. (To encourage the sharing I pay them a finders fee for
  1313. every copy sold off of a shared version.)  I have seen a similar system used
  1314. where the customer had to call in every year or so, dependant upon the number
  1315. of times the program was started, for access codes."
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325. Well, here are the answers!  First, nothing is going to prevent a user from
  1326. using diskcopy or the like.  However, the application will only work on the
  1327. computer that it was installed on.  What happens is the application leaves
  1328. your drive unprotected.  The user calls you up on the phone when they receive
  1329. the package.  The tell you a number on their power-up screen.  You type the
  1330. number in the library's unlock code utility and read them the number on your
  1331. screen.  Their application is now protected for that computer only - and they
  1332. never have to call you again, even if they need to do backups and restores,
  1333. unfragmenting, etc.  This code that they read you changes randomly (every
  1334. second).  The codes on your computer change by the random number, every day!
  1335. Even if one user tells another user the unlock code, it will not work (unless
  1336. by chance they received the same random number on the same date).  The odds of
  1337. this are minuscule.  This protection is not as foolproof as the hardware key,
  1338. but it is a lot cheaper (since you are not limited to the number of users per
  1339. the one time fee).
  1340.  
  1341. As far as the automatic demo mode goes, you have COMPLETE CONTROL over what
  1342. happens when.  The library was designed in such a way that if you use copy
  1343. protection and the copy protection failed the test, you can make it a demo,
  1344. abort, or whatever you want.  You can make the user call every year, every
  1345. day, every month (on the 20th), after 10 executions, or whenever!  Upon
  1346. demand, you can then remotely unlock it so that they never have to call you,
  1347. but it is still copy protected.  This would be great for people who pay you
  1348. every month on lease, etc.  Like I said, you have complete control!
  1349.  
  1350. Jon Cole asked "How does the product protect against a legitimate user making
  1351. a backup of the already installed product and restoring on another "identical"
  1352. system (ie same BIOS & hardware)?"
  1353.  
  1354. Unfortunately there is now way using either our method of copy protection OR
  1355. ANY method, could anyone determine one computer from another (identical one)
  1356. or stop unauthorized copies unless the hard disk itself is manipulated.  This
  1357. writing data to a sector on the hard drive technique (at least in our
  1358. experience) requires  protecting  a  floppy  and  mailing  it  to  the user.
  1359. Obviously this user may require special disk shipments in the event of hard
  1360. disk failure and the like.  We have eliminated that approach.  Given two
  1361. identical computers, the application might would work.  I say might because
  1362. I haven't actually found two computers that are identical that give me the
  1363. same copy protection password.  Keep in mind that 99% of the unauthorized
  1364. copying of applications occurs between two unidentical computers.  For all
  1365. practical purposes, our method is sufficient and definitely more convenient.
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. 3.3 Function Reference
  1391.  
  1392. The following pages contain a list of functions in the PROTECTION PLUS
  1393. library.  They are listed in alphabetical order.  The setup of the manual is
  1394. identical to the Clipper 5.0 manual.  The syntax defines a typical usage of
  1395. the function.  The parameters to the function are inside the parenthesis, and
  1396. the arrow points to the return value.  The first letters of the symbols used
  1397. represent the data type, either (D)ate, (N)umeric, (L)ogical, or (C)haracter.
  1398. The rest of the symbol characters are a name referenced in the description
  1399. section.
  1400.  
  1401. Most of the example code is from the SAMPLE.PRG file.  This Clipper source
  1402. demonstrates most of the PROTECTION PLUS library functions along with tons of
  1403. comments.
  1404.  
  1405. The following NOTES are important and should be read before trying to use the
  1406. function library.
  1407.  
  1408. NOTE:  All functions run PP_CHKPP() to verify that control file is sound.  If
  1409. this function returns a false, the function called will return either the
  1410. "worst case" value or an error value.  For example, if PP_EXPIRED() is run and
  1411. PP_CHKPP() failed during the execution, PP_EXPIRED() will return .T., to keep
  1412. the program from running.
  1413.  
  1414. NOTE:  The PUBLIC variable PP_CFILE must be defined in your application
  1415. containing the control filename.  The ".PPP" extension is appended
  1416. automatically.
  1417.  
  1418. Sample code
  1419.  
  1420. PUBLIC pp_cfile
  1421. pp_cfile="PROGNAME"
  1422.  
  1423. If your product initially goes out as a demo and gets unlocked, you might want
  1424. to destroy (overwrite, not just erase) the control file (.PPP) from the floppy
  1425. upon initialization.  This is so that the smart user can't copy it over (in
  1426. the case of execution-count limiting) and have more time with the demo than
  1427. desired.
  1428.  
  1429. One thing to keep in mind is that this library was set up so that you have
  1430. total control of what happens when.  The suggestions made in the sample source
  1431. code is only recommendations.  You may set your system up however you choose.
  1432. You can be pretty creative at how the security is structured!
  1433.  
  1434. ****************************************************************************
  1435.  
  1436. PP_ADVECT()
  1437.  
  1438. Increment the execution-limit counter
  1439.  
  1440. Syntax
  1441.     PP_ADVECT()  lStatus
  1442.  
  1443. Returns
  1444.     .T. if successful, else .F.
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Description
  1459.     Increments the execution counter by one.  The execution counter is stored
  1460.     in the control file.  The execution counter should be incremented once
  1461.     just before the main menu of your application is executed for the first
  1462.     time.  That way, if password protection is used and the user types in the
  1463.     wrong password and the program exits, he won't miss out on an execution.
  1464.  
  1465. Example
  1466.  
  1467. The first thing to do is right before the main menu is accessed for the first
  1468. time, the execution counter should be incremented if the expire type is set to
  1469. execution limit.  EXE_LIMIT is a logical defined in the beginning of the
  1470. program that is .T. of the expiration type is "E" for EXE limit.  We only need
  1471. to advance the counter if the EXE counter limiting is used
  1472.  
  1473. if exe_limit
  1474.     pp_advect()
  1475. endif
  1476.  
  1477. See also        PP_EXECT(), PP_EXELM(), PP_NEXECT(),
  1478.                 PP_NEXELM(), PP_NEXPTYPE()
  1479.  
  1480. ****************************************************************************
  1481.  
  1482. PP_CENUM()
  1483. Return the current code entry number
  1484.  
  1485. Syntax
  1486.     PP_CENUM()  nNumber
  1487.  
  1488. Returns
  1489.     The random number.
  1490.  
  1491. Description
  1492.     Generates a random number and declares a PUBLIC flag for the user code
  1493.     entry routine to use later.  This is used when either copy protection is
  1494.     used or other hidden routines are needed.  On the power-up screen, this
  1495.     number is displayed for the user to see.  When special access is needed to
  1496.     a routine, such as pp_copywrite(), the user tells you this number over the
  1497.     phone, so you can find the correct code using either the client tracking
  1498.     program or UNLOCK.EXE.
  1499.  
  1500.     The number is random, and leads to the ability to secure hidden procedures
  1501.     in your source code and only allow user access when he is online with you.
  1502.     Protection Plus gives you eighteen hidden procedures.  For example, say
  1503.     you have a password function in your application and your user forgets his
  1504.     password.  He can call you, tell you the code entry number on the screen,
  1505.     and you can run the decoder routine (in the host program) with his code
  1506.     entry number as a parameter, and instantly tell him a number to type in
  1507.     response to a special prompt, and the password check is overwritten.  He
  1508.     can then run the program, go to the password change function, and create a
  1509.     new password for future use.  Keep in mind, that the code entry number is
  1510.     random, but the actual code to enter in the special prompt changes EVERY
  1511.     DAY according to that number.  It would be nearly impossible to break the
  1512.     code, eliminating the possibility of one user calling another user and
  1513.     using unauthorized codes.  There are so many possibilities available for
  1514.     this and associated functions.  Use your imagination.
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526. Example
  1527.  
  1528. @ 5,2 say "Code entry: "+ltrim(str(pp_cenum()))
  1529.  
  1530. See also        UNLOCK.EXE, PP_UCODE()
  1531.  
  1532. ****************************************************************************
  1533.  
  1534. PP_CHKPP()
  1535. Verify the integrity of the control file
  1536.  
  1537. Syntax
  1538.     PP_CHKPP()  lStatus
  1539.  
  1540. Returns
  1541.     .T. if successful, else .F.
  1542.  
  1543. Description
  1544.     Checks the validity of the control file.  It is possible, however, for
  1545.     this function to return a .T. for "file okay" when the data is garbaged.
  1546.     This function call should be placed at the beginning of your application,
  1547.     if even desired at all.
  1548.  
  1549.     NOTE:  All functions in the PROTECTION PLUS library that depend on the
  1550.     control file call PP_CHKPP() to verify that control file is sound.  If
  1551.     this function returns a false, the function called will return either the
  1552.     "worst case" value or an error value.  For example, if PP_EXPIRED() is run
  1553.     and PP_CHKPP() failed during the execution, PP_EXPIRED() will return .T.,
  1554.     to keep the program from running.
  1555.  
  1556. Example
  1557.  
  1558. if !pp_chkpp()
  1559.     ?? "Error with application datafile"
  1560.     ?
  1561.     cancel
  1562. endif
  1563.  
  1564. See also        PP_CRPPP(), PP_SAVEPP()
  1565.  
  1566. ****************************************************************************
  1567.  
  1568. PP_COMPNO()
  1569. Return the computer number
  1570.  
  1571. Syntax
  1572.     PP_COMPNO()  nNumber
  1573.  
  1574. Returns
  1575.     A number representing a unique number of the computer.
  1576.  
  1577. Description
  1578.     The pp_compno function is used optionally to give you a computer "number."
  1579.     When the user first calls you to be unlocked (if copy protection is used),
  1580.     you enter the number that appears on his screen into the customer record
  1581.     of the client tracking program. If the user calls and says that his
  1582.     computer hard drive crashed, and you need to copy protect him again, when
  1583.     he calls back to unlock the "new hard drive" and this number is DIFFERENT,
  1584.     he is trying to fool you and install your software on another computer.
  1585.     This adds another level of security when the user "acts" stupid!
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594. Example
  1595.  
  1596. In this example, the computer number was appended on to the end of the serial
  1597. number.  This is to make the number a little more indistinguishable, since it
  1598. appears to be part of the serial number.
  1599.  
  1600. @ 4,2 say "    Serial: "+pp_serial()+"/"+ltrim(str(pp_compno()))
  1601.  
  1602. See also        PP_SERIAL()
  1603.  
  1604. ****************************************************************************
  1605.  
  1606. PP_COPYCHK()
  1607. Verify the copy protection
  1608.  
  1609. Syntax
  1610.     PP_COPYCHK()  lResult
  1611.  
  1612. Returns
  1613.     .T. if successful, else .F.
  1614.  
  1615. Description
  1616.     Test the value of the copy protection stored on disk and compares it to
  1617.     the application.  This is a system file that is hidden to the user.  The
  1618.     user will not be able to decode this encryption.  The protection will be
  1619.     different for every piece of software for every library sold, every
  1620.     computer out there, and every serial number of your application.  If you
  1621.     find a duplicate, please let us know so that we can write Guiness!
  1622.  
  1623. Example
  1624.  
  1625. If you would like to revert this program to a demo version in the even that
  1626. copy protection is invalid or not found, simple create a PUBLIC variable and
  1627. code the following.
  1628.  
  1629. demo_ver = !pp_copychk()
  1630.  
  1631. If you want the program not to work, code the following.  Keep in mind that
  1632. when the user first installs the software, there will not be any copy
  1633. protection on his hard drive.  He will need to call you first to create the
  1634. appropriate file.  So, you will never be able to just "terminate" an
  1635. application if copy protection is not found.  Because of this, refer to the
  1636. function PP_UCODE() on how to integrate this.
  1637.  
  1638. clear
  1639. get_code=0
  1640. If !pp_copychk()
  1641.     @ 10,10 say "Enter code: " get get_code
  1642.     read
  1643.     if pp_ucode(get_code)=1
  1644.         pp_copywrite()
  1645.     else
  1646.         clear
  1647.         cancel
  1648.     endif
  1649. endif
  1650.  
  1651. See also        PP_COPYWRITE(), PP_KILLPROT(),
  1652.                 PP_UCODE()
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661. ****************************************************************************
  1662.  
  1663. PP_COPYWRITE()
  1664. Create the copy protection file
  1665.  
  1666. Syntax
  1667.     PP_COPYWRITE()  lResult
  1668.  
  1669. Returns
  1670.     .T. if successful, else .F.
  1671.  
  1672. Description
  1673.     Writes the copy protection file to be used by the pp_copychk() function.
  1674.     This is a system file that is hidden to the user.  The user will not be
  1675.     able to decode this encryption.  The protection will be different for
  1676.     every piece of software for every library sold, almost every computer out
  1677.     there, and every serial number of your application.
  1678.  
  1679.     This function is usually part of a code entry function list.  Your
  1680.     application can be distributed as a demo.  If the user wishes to give you
  1681.     a credit card number or mail you a check, you can immediately unlock their
  1682.     software by running this function.
  1683.  
  1684. Example
  1685.  
  1686. See the example in PP_COPYCHK().
  1687.  
  1688. See also        PP_UCODE(), PP_COPYCHK(),
  1689.                 PP_KILLPROT()
  1690.  
  1691. ****************************************************************************
  1692.  
  1693. PP_CRPPP()
  1694. Create a new control file with blank data
  1695.  
  1696. Syntax
  1697.     PP_CRPPP()  lResult
  1698.  
  1699. Returns
  1700.     .T. always
  1701.  
  1702. Description
  1703.     If the control file (.ppp file) gets erased and the master diskettes were
  1704.     lost, this function can be used to create a dummy control file with blank
  1705.     string data, serial number 1, demo expire type, and date()+15 day expire
  1706.     date.  This could be used temporarily until a new control file is
  1707.     received.  If your product initially goes out as a demo and gets unlocked,
  1708.     you might want to destroy (overwrite, not just erase) the control file
  1709.     (.PPP) from the floppy upon initialization.  This is so that the smart
  1710.     user can't copy it over (in the case of execution-count limiting) and have
  1711.     more time with the demo than desired.
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730. Example
  1731.  
  1732. This is most often implemented in one of the hidden user-code positions.
  1733. Refer to PP_UCODE() for more information on integrating.
  1734.  
  1735. get_code=0
  1736. @ 20,10 say "Enter code: " get get_code
  1737. read
  1738.  
  1739. && define 5 as the "create blank ppp file" code
  1740. if pp_ucode(get_code)=5
  1741.     pp_crppp()
  1742. endif
  1743.  
  1744. See also        PP_CHKPP(), PP_SAVEPP(), PP_UCODE()
  1745.  
  1746. ****************************************************************************
  1747.  
  1748. PP_EXECT()
  1749. Return the current execution counter value
  1750.  
  1751. Syntax
  1752.     PP_EXECT()  nNumber
  1753.  
  1754. Returns
  1755.     Counter <nNumber> if successful, 0 upon error
  1756.  
  1757. Description
  1758.     Retrieves the value of the EXE execution counter stored in the control
  1759.     file.
  1760.  
  1761. Example
  1762.  
  1763. @ 10,20 say "Number of executions: "+ltrim(str(pp_exect()))
  1764.  
  1765. See also        PP_NEXECT(), PP_EXPIRED(), PP_ADVECT(),
  1766.                 PP_EXELM(), PP_NEXELM(),
  1767.                 PP_NEXPTYPE()
  1768.  
  1769. ****************************************************************************
  1770.  
  1771. PP_EXELM()
  1772. Return the current execution counter limit value
  1773.  
  1774. Syntax
  1775.     PP_EXELM()  nNumber
  1776.  
  1777. Returns
  1778.     Counter limit <nNumber> if successful, 0 upon error
  1779.  
  1780. Description
  1781.     Retrieves the value of the EXE execution counter limit stored in the
  1782.     control file.
  1783.  
  1784. Example
  1785.  
  1786. @ 10,20 say "Execution limit: "+ltrim(str(pp_exelm()))
  1787.  
  1788. See also        PP_NEXELM(), PP_EXPIRED(), PP_ADVECT(),
  1789.                 PP_EXECT(), PP_NEXECT(), PP_NEXPTYPE()
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797. ****************************************************************************
  1798.  
  1799. PP_EXPDATE()
  1800. Return the expiration date
  1801.  
  1802. Syntax
  1803.     PP_EXPDATE()  dExpireDate
  1804.  
  1805. Returns
  1806.     <dExpireDate> is the expiration date of the product or date()-1 if the
  1807.     control file is corrupted.
  1808.  
  1809. Description
  1810.     Determines the date of expiration stored in the control file.  If
  1811.     pp_getvar() is used, propl10 contains the same information - use it
  1812.     instead.
  1813.  
  1814. Example
  1815.  
  1816. Note that in the following example, propl10 and PP_EXPDATE() are totally
  1817. interchangeable.  It is quicker, however to use propl10 since the disk access
  1818. will be limited to once and not twice.  If the expire date is empty, we do not
  1819. print anything on the screen.
  1820.  
  1821. @  7,61 say if(!empty(propl10),"Expires: "+dtoc(propl10),"")
  1822.  
  1823. See also        PP_NEXPTYPE(), PP_EXPIRED(),
  1824.                 PP_UNLOCK(), PP_EXPTYPE(), PP_GETVAR()
  1825.  
  1826. ****************************************************************************
  1827.  
  1828. PP_EXPIRED()
  1829. Is this application expired?
  1830.  
  1831. Syntax
  1832.     PP_EXPIRED()  lResult
  1833.  
  1834. Returns
  1835.     .T. if the application is expired or the control file is corrupted, .F.
  1836.     otherwise.
  1837.  
  1838. Description
  1839.     Checks to see if first the current date is greater than the expire date.
  1840.     If the expire type is set to "E", it checks to make sure that the
  1841.     execution count is greater than the execution count limit.  If either of
  1842.     these conditions is true, the function returns .T..
  1843.  
  1844. Example
  1845.  
  1846. NOTE that if it has expired (by date) it is important to perform a
  1847. pp_upddate() (described later) so that the combination of the date checking
  1848. and the expiration date checking prohibit unauthorized use of your
  1849. application.
  1850.  
  1851. if pp_expired()
  1852.     ? "Sorry, but the demo for this product has expired... Please"
  1853.     ? "call and order from C.R.S. at 412-471-7638"
  1854.     ?
  1855.     pp_upddate()
  1856.     cancel
  1857. endif
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867. See also        PP_EXPDATE(), PP_NEXPTYPE(),
  1868.                 PP_UNLOCK(), PP_EXPTYPE(),
  1869.                 PP_UPDDATE()
  1870.  
  1871.  
  1872. ****************************************************************************
  1873.  
  1874. PP_EXPTYPE()
  1875. Return the expiration type
  1876.  
  1877. Syntax
  1878.     PP_EXPTYPE()  cString
  1879.  
  1880. Returns
  1881.     " " for error, or one of the following <N>one, <E>xe count, <D>emo,
  1882.     <P>ayments.
  1883.  
  1884. Description
  1885.     Retrieves the expiration type from the control file.  If the control file
  1886.     or the data in it is corrupted, a " " is returned.
  1887.  
  1888. Example
  1889.  
  1890. Set up some global flags.  Is this an execution limit version?  If it is, set
  1891. the flag EXE_LIMIT to .T. for use later in the program.
  1892.  
  1893. exe_limit=( pp_exptype() = "E" )
  1894.  
  1895. See also        PP_NEXPTYPE(), PP_EXPDATE(),
  1896.                 PP_EXPIRED(), PP_UNLOCK()
  1897.  
  1898. ****************************************************************************
  1899.  
  1900. PP_GETVAR()
  1901. Create PUBLIC variables from control file
  1902.  
  1903. Syntax
  1904.     PP_GETVAR()  lResult
  1905.  
  1906. Returns
  1907.     .T. if data successfully retrieved, .F. if control file is corrupted.
  1908.  
  1909. Description
  1910.     This function creates the following public variables and fills them with
  1911.     the data contained in the control file.
  1912.  
  1913.                     propl1   client's company
  1914.                     propl2   client's name
  1915.                     propl3   client's address
  1916.                     propl4   client's city
  1917.                     propl5   client's state
  1918.                     propl6   client's zip
  1919.                     propl7   client's phone
  1920.                     propl8   product name long form
  1921.                     propl9   product serial number
  1922.                     propl10  expiration date
  1923.                     propl12  proplus user's company
  1924.                     propl13  proplus user's address line 1
  1925.                     propl14  proplus user's address line 2
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.                     propl15  proplus user's phone
  1935.                     propl16  proplus user's fax number
  1936.                     propl17  last date system used
  1937.                     propl18  last time system used
  1938.  
  1939.  
  1940. Example
  1941.  
  1942. if !pp_getvar()
  1943.     ? "Error reading control file... Call technical support!"
  1944.     ?
  1945.     cancel
  1946. endif
  1947.  
  1948. See also        PP_SAVEPP(), PP_CHKPP(), PP_CRPPP()
  1949.  
  1950.  
  1951. ****************************************************************************
  1952.  
  1953. PP_KILLPROT()
  1954. Remove the copy protection
  1955.  
  1956. Syntax
  1957.     PP_KILLPROT()  lResult
  1958.  
  1959. Returns
  1960.     .T. if successful, else .F.
  1961.  
  1962. Description
  1963.     Will remove all copy protection from the current application.  This
  1964.     function, like most others, relies on the PUBLIC pp_cfile variable to be
  1965.     defined as mentioned in the beginning notes.  This function is most
  1966.     commonly found as one of the hidden user-codes.  Refer to PP_UCODE() to
  1967.     see how to integrate this.
  1968.  
  1969. Example
  1970.  
  1971. if pp_killprot()       && kill copy protection on hard drive
  1972.     @ 2,0 say "Protection erased!"
  1973. endif
  1974.  
  1975. See also        PP_COPYWRITE(), PP_COPYCHK(),
  1976.                 PP_UCODE()
  1977.  
  1978. ****************************************************************************
  1979.  
  1980. PP_NEXECT()
  1981. Reset the execution counter value
  1982.  
  1983. Syntax
  1984.     PP_NEXECT( <nNewCount> )  lResult
  1985.  
  1986. Arguments
  1987.     <nNewCount> is the number to which to set the execution counter.
  1988.  
  1989. Returns
  1990.     .T. if successful, else .F.
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002. Description
  2003.     Sets the execution counter, kept in the control file, to the number
  2004.     specified.  This function allows the execution counter to be changed from
  2005.     within the application itself.  This could be one of the hidden user-
  2006.     codes.
  2007.  
  2008. Example
  2009.  
  2010. pp_nexect(0)     && sets execution counter to zero
  2011.  
  2012. See also        PP_EXELM(), PP_UCODE(), PP_EXECT(),
  2013.                 PP_ADVECT(), PP_NEXELM()
  2014.  
  2015. ****************************************************************************
  2016.  
  2017. PP_NEXELM()
  2018. Reset a new execution limit value
  2019.  
  2020. Syntax
  2021.     PP_NEXELM( <nNewLimit> )  lResult
  2022.  
  2023. Arguments
  2024.     <nNewLimit> is the number to which to set the execution counter limit.
  2025.  
  2026. Returns
  2027.     .T. if successful, else .F.
  2028.  
  2029. Description
  2030.     Sets the execution counter, kept in the control file, to the number
  2031.     specified.  This function allows the execution counter limit to be changed
  2032.     from within the application itself.  This could be one of the hidden user-
  2033.     codes.
  2034.  
  2035. Example
  2036.  
  2037. pp_nexelm(50)    && extends the execution counter limit to 50.
  2038.  
  2039. See also        PP_EXECT(), PP_EXELM(), PP_ADVECT(),
  2040.                 PP_NEXECT(), PP_UCODE()
  2041.  
  2042. ****************************************************************************
  2043.  
  2044. PP_NEXPTYPE()
  2045. Reset the expiration type and date/exe limit
  2046.  
  2047. Syntax
  2048.     PP_NEXPTYPE( <sType>, <dData> OR <nData> )
  2049.                      lResult
  2050.  
  2051. Arguments
  2052.     <sType> is the new expiration type.
  2053.     <dData> OR <nData> is the data associated with the expiration type.
  2054.  
  2055. Returns
  2056.     .T. if successful, else .F.
  2057.  
  2058. Description
  2059.     Resets the expire type to the <sType> given.  Depending on what the value
  2060.     of <sType> is, sets other applicable data.  <sType> must be upper-case!
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070. TYPE            DATA
  2071. <P>ayments      DATE of next payment (expiration)
  2072. <D>emo          DATE of expiration
  2073. <E>xe count     NUMBER (numeric) of executions allowed
  2074.  
  2075.     Note that <N> is not a choice.  To set expiration type to "N", use the
  2076.     pp_unlock() function.  This is also used to reset the expiration date.
  2077.     Also note that when the type is changed to <E>, the expiration date field
  2078.     is blanked and the execution counter is zeroed.  When the type is changed
  2079.     to <P> or <D>, the execution limit and counter is zeroed.  This could be
  2080.     one of the hidden user-codes.  Refer to PP_UCODE() for information on how
  2081.     to integrate this.
  2082.  
  2083. Example
  2084.  
  2085. *Set next expiration type to <P>ayments and make it expire on
  2086. *the next payment date around the 20th of next month
  2087.  
  2088. if pp_nexptype("P",pp_npdate(date(),20))
  2089.     @ 2,0 say "Application payment expire date extended to"+;
  2090.         dtoc(pp_npdate(date(),20))
  2091. endif
  2092.  
  2093. -OR-
  2094.  
  2095. *Set the next expiration type to <D>emo and make it expire on 12/31/91
  2096.  
  2097. if pp_nexptype("D",ctod("12/31/91"))
  2098.     @ 2,0 say "Application demo expire date set to 12/31/91"
  2099. endif
  2100.  
  2101. See also        PP_EXPIRED(), PP_UNLOCK(), PP_NPDATE()
  2102.                 PP_EXPTYPE(), PP_EXPDATE(), PP_UCODE()
  2103.  
  2104. ****************************************************************************
  2105.  
  2106. PP_NPDATE()
  2107. Return next payment date
  2108.  
  2109. Syntax
  2110.     PP_NPDATE( <dDate>, <nDay> )  dDate
  2111.  
  2112. Arguments
  2113.     <dDate> is a date in the current month.
  2114.     <nDay> is the day of next month that payment is due.
  2115.  
  2116. Returns
  2117.     Date of next payment due.
  2118.  
  2119. Description
  2120.     The <nDay>th day in the month after the month of <dDate> is returned.  If
  2121.     this day happens to be on a weekend, the next Monday date is returned.
  2122.     This function is used in conjunction with pp_nexptype().  Together with
  2123.     the user-code, your client can call you up after you receive his monthly
  2124.     check, type in the appropriate user-code and have his product work until
  2125.     next month.
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137. Example
  2138.  
  2139. *Set next expiration type to <P>ayments and make it expire on
  2140. *the next payment date around the 20th of next month
  2141.  
  2142. if pp_nexptype("P",pp_npdate(date(),20))
  2143.     @ 2,0 say "Application payment expire date extended to"+;
  2144.         dtoc(pp_npdate(date(),20))
  2145. endif
  2146.  
  2147. See also        PP_NEXPTYPE(), PP_UCODE()
  2148.  
  2149. ****************************************************************************
  2150.  
  2151. PP_SAVEPP()
  2152. Save changed control file data
  2153.  
  2154. Syntax
  2155.     PP_SAVEPP()  lResult
  2156.  
  2157. Returns
  2158.     .T. always
  2159.  
  2160. Description
  2161.     This function is used if you would like to give the user the ability to
  2162.     change the string data stored in the configuration file upon request.  It
  2163.     is necessary to first call the pp_getvar() function to create the PUBLIC
  2164.     variables.  The variables can then be changed.  Call this function after
  2165.     the variables are changed to store them into the control file. Note the
  2166.     importance of the data type.
  2167.  
  2168. Example
  2169.  
  2170. *Assuming that PP_GETVAR() has already been run:
  2171.  
  2172. @ 10,10 say "Enter new company: " get propl1
  2173. @ 11,10 say "   Enter new name: " get propl2
  2174. @ 12,10 say "Enter new address: " get propl3
  2175. @ 13,10 say "   Enter new city: " get propl4
  2176. @ 14,10 say "  Enter new state: " get propl5
  2177. @ 15,10 say "    Enter new ZIP: " get propl6
  2178. read
  2179. pp_savepp()
  2180.  
  2181. See also        PP_CRPPP(), PP_CHKPP()
  2182.  
  2183. ****************************************************************************
  2184.  
  2185. PP_SERIAL()
  2186. Return the product serial number
  2187.  
  2188. Syntax
  2189.     PP_SERIAL()  cString
  2190.  
  2191. Returns
  2192.     Serial number as a string, "ERROR" or "ZZZZZZ".
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205. Description
  2206.     Returns the serial number of the product.  If hard-coded serial numbers is
  2207.     used, this number is returned.  Otherwise the serial number in the control
  2208.     file is returned.  If hard-coded serial numbers is not being used and the
  2209.     control file is corrupted, "ERROR" will be returned.  If either method is
  2210.     used, but the product has not been stamped with PROPLUS.EXE, "ZZZZZZ" will
  2211.     be returned.
  2212.  
  2213.     NOTE:  This function MUST be included in your source code if you intend on
  2214.     using copy protection.  Whether or not you display the actual number, you
  2215.     must include it so that the application is stamped as unique.  If you do
  2216.     not use copy protection, however, it is not required.
  2217.  
  2218. Example
  2219.  
  2220. @ 4,2 say "Serial: "+pp_serial()
  2221.  
  2222. See also        PP_COMPNO()
  2223.  
  2224. ****************************************************************************
  2225.  
  2226. PP_UCODE()
  2227. Return user (hidden) code
  2228.  
  2229. Syntax
  2230.     PP_UCODE( <nNumber> )  nResult
  2231.  
  2232. Arguments
  2233.     <nNumber> is the number input from the user.
  2234.  
  2235. Returns
  2236.     Number between 0 and 18.
  2237.  
  2238. Description
  2239.     Compares the code entry value passed to today's code entry numbers for the
  2240.     given code entry random number generated previously with pp_cenum().  If
  2241.     the value is correct, it returns a number from 1-18 to represent the
  2242.     "hidden" function to be run.  Otherwise, a zero is returned indication
  2243.     either an error in parameter type or invalid code.  This is where the
  2244.     great flexibility lies in the PROTECTION PLUS library.  You have the
  2245.     complete control over what you want to do, and what you would like to hide
  2246.     from your users, while still keeping the capability of your procedures
  2247.     available at your request.
  2248.  
  2249. Example
  2250.  
  2251. The following example is from an application's power-up screen.  The first
  2252. thing here is the entering of the password.  Notice how a set key statement is
  2253. used for the user-code function.
  2254.  
  2255. set key -4 to ucode           && F5 for hidden routines
  2256. password=space(8)
  2257. do while empty(password) .AND. !lastkey()=27
  2258.     @ 20,28 clear to 20,60
  2259.     @ 20,30 say "Password: " get password picture "@!"
  2260.     read
  2261. enddo
  2262. set key -4 to
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272. * Write your own code here to test password and continue program if ok.
  2273.  
  2274. if password#"PROPLUS "
  2275.     pp_upddate()
  2276.     set color to
  2277.     clear
  2278.     @ 2,0 say "Incorrect password entered, program aborted!"
  2279.     @ 4,0 say ""
  2280.     cancel
  2281. endif
  2282.  
  2283. At this point, the program is allowed to continue.  This is where you would
  2284. stick the first "DO" command to execute your main menu or whatever you do
  2285. next.
  2286.  
  2287. do main_menu
  2288.  
  2289. This function UCODE() you create to get the secret number after the user
  2290. signals the code entry key sequence, whatever you define.  For the purposes of
  2291. this demo, only the result routine number is printed on the screen.  In your
  2292. application, you could set up a set of case statements for each value (1-18)
  2293. to carry out your routines.  A zero is returned if an invalid value was
  2294. entered.  The program can execute a function and continue with the program or
  2295. execute a function and cancel to dos.  You have complete control!  All of
  2296. these functions drop to dos after executing.
  2297.  
  2298. FUNCTION ucode
  2299.     PRIVATE _routine
  2300.     clear gets
  2301.     get_code=0
  2302.     @ 20,28 say "Enter code: " get get_code picture "@Z"
  2303.     read
  2304.     if lastkey()=27
  2305.         retu .T.
  2306.     endif
  2307.     _routine=pp_ucode(get_code)
  2308.     set color to
  2309.     clear
  2310.     do case
  2311.         case _routine=1                  && unlock application
  2312.             if pp_unlock()
  2313.                 @ 2,0 say "Application unlocked..."
  2314.             endif
  2315.         case _routine=2                  && advance payment date
  2316.             if pp_nexptype("P",pp_npdate(date(),20))
  2317.                 @ 2,0 say "Application payment expire date "+;
  2318.                     extended to "+dtoc(pp_npdate(date(),20))
  2319.             endif
  2320.         case _routine=3                  && kill protection from disk
  2321.             if pp_killprot()
  2322.                 @ 2,0 say "Protection erased!"
  2323.             endif
  2324.         case _routine=4
  2325.             if pp_nexptype("D",ctod("4/10/91"))
  2326.                 @ 2,0 say "Application demo expire date set "+;
  2327.                   "to 4/1/91"
  2328.             endif
  2329.         case _routine=10                 && write copy protection file
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.             pp_copywrite()
  2339.         case _routine=0                  && error
  2340.             retu .F.
  2341.     endcase
  2342.     @ 4,0 say ""
  2343.     exit_program()
  2344. return .T.
  2345.  
  2346. See also        PP_NEXECT(), PP_NEXELM(),
  2347.                 PP_NEXPTYPE(), PP_NPDATE(),
  2348.                 PP_UNLOCK(), PP_UPDDATE()
  2349.  
  2350.  
  2351. ****************************************************************************
  2352.  
  2353. PP_UNLOCK()
  2354. Unlock the program (from date/exe expiration)
  2355.  
  2356. Syntax
  2357.     PP_UNLOCK()  lResult
  2358.  
  2359. Returns
  2360.     .T. if successful, else .F.
  2361.  
  2362. Description
  2363.     Updates the control file to make the expiration type "N" for none and
  2364.     empties the expiration date field.  This is most commonly found as one of
  2365.     the hidden user-codes.  Upon the completion of payment from your client,
  2366.     you may unlock him from any type of expiration type (either date or exe
  2367.     counts).  This leaves all copy protection intact.  Refer to "Commonly
  2368.     Asked Questions" on page  for more information about application limiting
  2369.     and unlocking versus copy protection.  Refer to PP_UCODE() to see how to
  2370.     integrate this function as a user-code.
  2371.  
  2372. Example
  2373.  
  2374. if pp_unlock()
  2375.     @ 2,0 say "Application unlocked..."
  2376. endif
  2377.  
  2378. See also        PP_UCODE(), PP_NEXPTYPE()
  2379.  
  2380. ****************************************************************************
  2381.  
  2382. PP_UPDDATE()
  2383. Updates the last time used fields
  2384.  
  2385. Syntax
  2386.     PP_UPDDATE()  lResult
  2387.  
  2388. Returns
  2389.     .T. if successful, else .F.
  2390.  
  2391. Description
  2392.     Stores the current value of date() and time() in the control file.  This
  2393.     should be run upon exiting the program.  This is because if the user keeps
  2394.     setting back the clock, it would be impossible to avoid the narrowing
  2395.     window.  If he uses the program for an hour every day, eventually, no
  2396.     matter how much he changes the date and time, will not be able to access
  2397.     the program.  This occurs provided that you run the check date function
  2398.     pp_valdate() upon entry.
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407. Example
  2408.  
  2409. A function to clean up screen and update the last used date and time is
  2410. recommended.  The last used date and time should be updated upon exiting
  2411. because if the user keeps setting back the clock, it would be impossible to
  2412. avoid the narrowing window. If he uses the program for an hour every day,
  2413. eventually, no matter how much he changes the date and time, will not be able
  2414. to access the program.  This occurs provided that you run the check date
  2415. function pp_valdate upon entry.
  2416.  
  2417. FUNCTION exit_program
  2418.     pp_upddate()
  2419.     set color to
  2420.     clear
  2421.     cancel
  2422. return .T.
  2423.  
  2424. NOTE that if it has expired (by date) it is important to perform a
  2425. pp_upddate() (described later) so that the combination of the date checking
  2426. and the expiration date checking prohibit unauthorized use of your
  2427. application.
  2428.  
  2429. if pp_expired()
  2430.     ? "Sorry, but the demo for this product has expired... "
  2431.     ? "Please call and order from C.R.S. at 412-471-7638"
  2432.     ?
  2433.     pp_upddate()
  2434.     cancel
  2435. endif
  2436.  
  2437. See also        PP_UCODE(), PP_VALDATE()
  2438.  
  2439. ****************************************************************************
  2440.  
  2441. PP_VALDATE()
  2442. Validates last date/time used
  2443.  
  2444. Syntax
  2445.     PP_VALDATE()  lResult
  2446.  
  2447. Returns
  2448.     .T. if the current date and time > last date and time used, .F.  otherwise
  2449.     or on error.
  2450.  
  2451. Description
  2452.     Makes sure that the last date and time used, stored in the control file,
  2453.     is less than the current date and time.
  2454.  
  2455. Example
  2456.  
  2457. The following checks the date and the time to make sure that the last date and
  2458. time used is less than the current date and time.  If not, the user is trying
  2459. to "back up" the computer clock in order to gain more time from your running
  2460. demo or payment package.  This check is only valid IF the current expire type
  2461. is NOT "None" (which means unlocked).  The test is run once.  If it fails, the
  2462. user can enter the new date and time.  If it still fails then he is given an
  2463. option to enter a code number.  This is just in case the user accidentally
  2464. forwards his DOS date to an advanced value and runs the program and then sets
  2465. it back correctly.  If you do not follow this two step check as shown below,
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474. the user will NEVER be able to set his clock back to the right date and run
  2475. your application.  Upon entering the correct code number, the current DOS date
  2476. and time is saved into the last used date and time field in the control file.
  2477.  
  2478.  
  2479. if !pp_valdate() .AND. pp_exptype()#"N"
  2480.     clear
  2481.     curr_date=date()
  2482.     curr_time=time()
  2483.     @ 2,0 say "Please set the date and time correctly:"
  2484.     ?
  2485.     ?
  2486.     run date
  2487.     @ 7,0 say ""
  2488.     run time
  2489. endif
  2490.  
  2491. if !pp_valdate() .AND. pp_exptype()#"N"
  2492.     clear
  2493.     @ 2,0 say "The date and time is still incorrect.  Please call"+;
  2494.         " technical support"
  2495.     @ 3,0 say "for assistance.              Code entry #:"+;
  2496.         ltrim(str(pp_cenum()))+"  Date: "+dtoc(date())
  2497.     get_code=0
  2498.     @ 5,0 say "Enter code: " get get_code picture "@Z"
  2499.     read
  2500.     if pp_ucode(get_code)=5     && arbitrary number chosen by you
  2501.         pp_upddate()
  2502.         pp_getvar()     && get new values since they just changed
  2503.     else
  2504.         clear
  2505.         cancel
  2506.     endif
  2507. endif
  2508.  
  2509. See also        PP_UPDDATE(), PP_UCODE()
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540. 3.4 Function quick-reference list
  2541.  
  2542. pp_advect()          Increment the execution-limit counter
  2543. pp_cenum()           Return the current code entry number
  2544. pp_chkpp()           Verify the integrity of the control file
  2545. pp_compno()          Return the "computer number"
  2546. pp_copychk()         Verify the copy protection
  2547. pp_copywrite()       Create the copy protection file
  2548. pp_crppp()           Create a new control file
  2549. pp_exect()           Return the current execution counter value
  2550. pp_exelm()           Return the current execution limit value
  2551. pp_expdate()         Return the expiration date
  2552. pp_expired()         Is this application expired?
  2553. pp_exptype()         Return the expiration type
  2554. pp_getvar()          Create PUBLIC variables from control file
  2555. pp_killprot()        Remove the copy protection
  2556. pp_nexect()          Reset the execution counter value
  2557. pp_nexelm()          Reset a new execution limit value
  2558. pp_nexptype()        Reset the expiration type and date/exe limit
  2559. pp_npdate()          Return next payment date
  2560. pp_savepp()          Save changed control file data
  2561. pp_serial()          Return the product serial number
  2562. pp_ucode()           Return user (hidden) code
  2563. pp_unlock()          Unlock the program (from date/exe expiration)
  2564. pp_upddate()         Updates the last time used fields
  2565. pp_valdate()         Validates last date/time used
  2566.  
  2567.  
  2568. 3.5 Reserved Words
  2569.  
  2570. The following variable names are reserved.  They can not be used as variable
  2571. names elsewhere in your application.  These variables are only reserved if you
  2572. call PP_GETVAR().  The purpose of these variables is to allow you to display
  2573. licensing information stored in the control file.  If you intend to use
  2574. PP_GETVAR(), do not use these variable names elsewhere in your program.
  2575.  
  2576. PROPL1
  2577. PROPL2
  2578. PROPL3
  2579. PROPL4
  2580. PROPL5
  2581. PROPL6
  2582. PROPL7
  2583. PROPL8
  2584. PROPL9
  2585. PROPL10
  2586. PROPL12
  2587. PROPL13
  2588. PROPL14
  2589. PROPL15
  2590. PROPL16
  2591. PROPL17
  2592. PROPL18
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606. 4. Sample Source
  2607.  
  2608. Ok, do you like looking at source code?  Good!  This is the section of the
  2609. manual that demonstrates various ways you can utilize the power and
  2610. versatility of PROTECTION PLUS.  The file SAMPLE.PRG contains a typical
  2611. application that includes almost every basic feature of the library.  This
  2612. file is well documented.  The examples in this section break apart the
  2613. different modes of operation, from copy protection to execution-count
  2614. limiting.
  2615.  
  2616. 4.1 To Copy Protect
  2617.  
  2618. There are five simple functions that you need to be familiar with in order to
  2619. copy protect you application.  First, PP_UCODE() will be used to "hide" the
  2620. functions PP_COPYWRITE(), PP_CENUM(), PP_COPYCHK(), and PP_KILLPROT().
  2621. PP_UCODE(), as we will now call the "user-code function," is added most
  2622. commonly with the set key to statement.  That way, when a user presses a
  2623. function key (let's use F5), a pop up will then display a number and ask for
  2624. a number.  The number displayed is the code entry number.  This number is
  2625. explained under PP_CENUM() in the function reference.  The number the user has
  2626. to type in is one of the unlock codes.  The number he (the user) types in is
  2627. passed to PP_UCODE().  This function will then decode the number, and return a
  2628. number between zero and eighteen (0-18).  This number corresponds to the user
  2629. code to which you assign functions.  Usually a DO CASE structure is employed
  2630. to determine which function to run.  If the function PP_UCODE() returns a zero
  2631. (0), the code entered was invalid.
  2632.  
  2633. Once the structure is set up, you can place the other functions PP_COPYWRITE()
  2634. and optionally PP_KILLPROT() in the DO CASE structure.  These functions create
  2635. the copy protection file and erase the protection file, respectively.  Refer
  2636. to the file SAMPLE.PRG function UCODE() for an example of this.
  2637.  
  2638. 4.2 Monthly Unlock (payments)
  2639.  
  2640. Creating an application that must be unlocked every month on a certain day is
  2641. simple.  This would be used if, for example, your application is leased.  The
  2642. same basic method described in  To Copy Protect dealing with PP_UCODE() is
  2643. used.  If copy protection is used, the method described in that section will
  2644. be implemented along with at least two other functions for the payments.
  2645. PP_NPDATE() will return the date for the given day of the month that you would
  2646. like to expire.  If that day is on a weekend, it will return the next Monday.
  2647. PP_NEXPTYPE() is used in conjunction with this function to advance the next
  2648. expiration date.  You would pass it a "P" for payments and PP_NPDATE() as
  2649. shown in the file SAMPLE.PRG.  Last, the application leaves your computer
  2650. serialized and ready to expire on the day of next month that you setup.  You
  2651. have total control on how the system is setup!
  2652.  
  2653. 4.3 Application with Modules
  2654.  
  2655. If your application is sold in modules, and the user can purchase only what he
  2656. needs, you could actually ship him the entire package.  How you would set it
  2657. up, assuming that every module has a separate EXE file, is assign a different
  2658. control file to each module.  This would be done even if the program is not
  2659. packaged as separate EXE files.  In PROPLUS.EXE, you would have a client
  2660. record for every client and every module in that package.  This might be a bit
  2661. cumbersome at first, but look at the power you have.  You could, at will,
  2662. enable a module to work as a demo remotely.  This would be great if your user
  2663. calls you up and says he is now interested in another one of your modules.
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672. You could, over the phone, enable the module he wants, and not have to worry
  2673. about it stopping on a certain day or after so many executions.
  2674.  
  2675. This is how it is set up.  First, the main EXE file (or main menu routine),
  2676. will have its normal control file.  When the user presses the menu function
  2677. that calls a module, change the value of PP_CFILE to reflect the new module.
  2678. You can then see if it is unlocked.  If it is, run the program, else print a
  2679. message or whatever else you want.  BE SURE to change PP_CFILE back to its
  2680. original value when complete with that module.  When you change the status of
  2681. a module for a client, use PROPLUS.EXE to keep track of when it was installed,
  2682. when it will expire, etc.  At the touch of a button, you will know which of
  2683. your clients is using which modules.
  2684.  
  2685. The addition of protection or demo modes for the main program and its modules
  2686. is all controlled through the PP_UCODE() function.  Refer to this function for
  2687. coding examples.  You could even "nest" the user-code values to effectively
  2688. achieve more than 18 hidden user-codes.
  2689.  
  2690.  
  2691. 5. PROPLUS Programming Service
  2692.  
  2693.                     ┌─────────────────────────────────────┐
  2694.                     │  PPS - ProPlus Programming Support  │
  2695.                     └─────────────────────────────────────┘
  2696.  
  2697. We realize that adding this level of protection to your programs may not be
  2698. easy, therefore we have developed this program to allow you to purchase
  2699. PROPLUS and let us do the programming for you at a very nominal rate.
  2700.  
  2701. If you need help in installing PROPLUS functions into your program, send the
  2702. top of your program (from line 1 till the first DO) on  a 5 1/4 or 3 1/2 inch
  2703. disk.
  2704.  
  2705. List the types of protection that you would like incorporated into your
  2706. program.  We will add the needed functions and send your fully tested source
  2707. code back to you.
  2708.  
  2709. All you need to do is insert it back into the top of your program, recompile,
  2710. link and it's ready to distribute.
  2711.  
  2712.                  ┌───────────────────────────────────────────┐
  2713.                  │  What do I do to get PPS working for me?  │
  2714.                  └───────────────────────────────────────────┘
  2715.  
  2716. List the protections that you would like to have added to your program here by
  2717. entering the names in the Action blanks and the meaning next to it .  If you
  2718. want a certain code to call your functions,  enter your function_name() on the
  2719. Action blank.  If you want a certain code to call a procedure, write DO
  2720. your_proc on the Action blank.
  2721.  
  2722. IE:
  2723.       ┌─────────┬──────────────────────────┬───────────────────────────┐
  2724.       │ Code #  │    ACTION                │     MEANING               │
  2725.       ├─────────┼──────────────────────────┼───────────────────────────┤
  2726.       │ Code 1: │  pp_copywrite()          │  Activate Protection File │
  2727.       │ Code 2: │  DO zap                  │  Empty users database     │
  2728.       └─────────┴──────────────────────────┴───────────────────────────┘
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738. Enter your desired actions and meanings below.
  2739.  
  2740.       ┌─────────┬──────────────────────────┬───────────────────────────┐
  2741.       │ Code #  │    ACTION                │     MEANING               │
  2742.       ├─────────┼──────────────────────────┼───────────────────────────┤
  2743.       │ Code 1: │________________________  │  ________________________ │
  2744.       │ Code 2: │________________________  │  ________________________ │
  2745.       │ Code 3: │________________________  │  ________________________ │
  2746.       │ Code 4: │________________________  │  ________________________ │
  2747.       │ Code 5: │________________________  │  ________________________ │
  2748.       │ Code 6: │________________________  │  ________________________ │
  2749.       │ Code 7: │________________________  │  ________________________ │
  2750.       │ Code 8: │________________________  │  ________________________ │
  2751.       │ Code 9: │________________________  │  ________________________ │
  2752.       │ Code 10:│________________________  │  ________________________ │
  2753.       │ Code 11:│________________________  │  ________________________ │
  2754.       │ Code 12:│________________________  │  ________________________ │
  2755.       │ Code 13:│________________________  │  ________________________ │
  2756.       │ Code 14:│________________________  │  ________________________ │
  2757.       │ Code 15:│________________________  │  ________________________ │
  2758.       │ Code 16:│________________________  │  ________________________ │
  2759.       │ Code 17:│________________________  │  ________________________ │
  2760.       │ Code 18:│________________________  │  ________________________ │
  2761.       └─────────┴──────────────────────────┴───────────────────────────┘
  2762.  
  2763. The charge for this service is $75.00 per source file changed.
  2764.  
  2765. For us to return this via US Mail add $2.50 S&H.  For us to return this via
  2766. Federal Express Next Day add $18.00 S&H.
  2767.  
  2768. All checks and money orders must be made out in US Dollars.
  2769.  
  2770.  
  2771. Name    _________________________________________________________________
  2772. Company _________________________________________________________________
  2773. Address _________________________________________________________________
  2774.         _________________________________________________________________
  2775. City    _______________________________ State __________  Zip ___________
  2776. Phone   (_____)______-________          Country _________________________
  2777.  
  2778.     PPS       $        75.00
  2779.     Shipping  $__________________
  2780.     Total     $__________________    (Please attach payment)
  2781.  
  2782.                                  Comments/Suggestions:
  2783.        _________________________________________________________________
  2784.        _________________________________________________________________
  2785.        _________________________________________________________________
  2786.        _________________________________________________________________
  2787.        _________________________________________________________________
  2788.        _________________________________________________________________
  2789.        _________________________________________________________________
  2790.        _________________________________________________________________
  2791.        _________________________________________________________________
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.